import { SAVE_ARTICLE } from '../actions/article'

// 文章模块 初始值
const initState = {
  list: [],
}

// 文章模块 reducer
export default function articleReducer(state = initState, action) {
  switch (action.type) {
    case SAVE_ARTICLE:
      return { ...state, list: action.payload }
    default:
      return state
  }
}
